package com.ljy.retry;
/** 
* @author James
* @date 2018年8月23日 
*/
public class RetryMain {
	//熔断器
	public static void main(String[] args) {
		HelloWorldService service=RetryProxy.getObject(HelloWorldService.class);
		long start=System.currentTimeMillis();
		try {
			System.out.println(service.sayHello("james"));
		}catch(Exception e) {
			e.printStackTrace();
		}
		try {
			System.out.println(service.sayHello("james"));
		}catch(Exception e) {
			e.printStackTrace();
		}
		try {
			System.out.println(service.sayHello("james"));
		}catch(Exception e) {
			e.printStackTrace();
		}
		try {
			System.out.println(service.sayHello("james"));
		}catch(Exception e) {
			e.printStackTrace();
		}
		RetryProxy.shutdownExecutor();
	}
}
